<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="http://api.mapabc.com/fmp/v1.0/js/fmp.js?key=d9026b1f289933f5c6312d30df7b9841a71a3e2eb5266aacb8babbd753b1595d3aa8631ddbb4656e" type="text/javascript">
</script>
<title>示例代码</title>
</head>
<body>
<div id="mapObj" class="view" style="width:1000px;height:500px"></div> 
<SCRIPT LANGUAGE="JavaScript">
  //设置地图初始化参数对象
  var mapOptions = new MMapOptions();
  mapOptions.mapId = "fmptest";
  mapOptions.zoomLevel = 10;
  //设置中心点为北京
  mapOptions.center = new MLatLng("KJONOWKMHLL,MRGYNMLHL");
  //创建地图对象
  var mapObj = new MMap("mapObj", mapOptions);

var points = new Array(); 

var pointStyle = new MStyle(); 
pointStyle.lineColor = 0xff0000; 
pointStyle.lineSize = 3; 
pointStyle.fillColor = 0xddaabb; 
pointStyle.fillOpacity = 50; 
pointStyle.labelColor = 0x00ff00; 
pointStyle.textContent = '';

//循环此部分即可输出多个点.pointStyle.textContent设置的是每个图片在鼠标移上去后显示的详细信息，可以不管。
pointStyle.textContent = "<font color='#ff0000'>第一个点的文字描述</font><br>详细信息"; 
points.push(new MPointOverlay(new MLatLng("KJONOWKMHLL,MRGYNMLHL"), "第一个点", pointStyle, "2001")); 

pointStyle.textContent = "<font color='#ff00aa'>第二个点的文字描述</font><br>详细信息"; 
points.push(new MPointOverlay(new MLatLng("KJONOWOILHH,MRGYMXEHHL"), "第二个点", pointStyle, "2002")); 

pointStyle.textContent = "<font color='#aaff00'>第三个点的文字描述</font><br>详细信息"; 
points.push(new MPointOverlay(new MLatLng("KJONOWQMHLH,MRGYMVEHHL"), "第三个点", pointStyle, "2003")); 

pointStyle.textContent = "<font color='#0000ff'>第四个点的文字描述</font><br>详细信息"; 
points.push(new MPointOverlay(new MLatLng("KJONOWRELHL,MRGYMVMLPH"), "第四个点", pointStyle, "2004")); 



/*var pointStyle = new MStyle(); 
pointStyle.lineColor = 0xff0000; 
pointStyle.lineSize = 3; 
pointStyle.fillColor = 0xddaabb; 
pointStyle.fillOpacity = 50; 
pointStyle.labelColor = 0x00ff00; 
var jsons = [{x:"KJONOWKMHLL",y:"MRGYNMLHL",title:"第一个点",content:"第一个点的文字描述",id:"1"},{x:"KJONOWOILHH",y:"MRGYMXEHHL",title:"第2个点",content:"第2个点的文字描述",id:"2"},{x:"KJONOWQMHLH",y:"MRGYMVEHHL",title:"第3个点",content:"第3个点的文字描述",id:"3"}];
for(i=0;i<jsons.length;i++){
	//var j =  jsons[i];
	point = new MPointOverlay(new MLatLng(jsons[i].x + jsons[i].y), jsons[i].title, pointStyle, jsons[i].id); 
	points.push(point);
}*/

/*points.push(point1); 
points.push(point2); 
points.push(point3); 
points.push(point4);*/ 
mapObj.drawPoints(points, true); 
</script>
</body>
</html>